/**
 * Created by zhaolong on 2018/7/6.
 */
export default {
  state: {
    user_info: {    // 存储用户登录信息
      username: "",
      password: "",
      email: "",
      unit: "",
      phone: ""
    }
  },

  getters: {
    userInfo: state => state.user_info
  },

  mutations: {
    setUserInfo (state, payload) {
      state.user_info.username = payload.username;
      state.user_info.password = payload.password;
      state.user_info.email = payload.email;
      state.user_info.unit = payload.unit;
      state.user_info.phone = payload.phone;
    }
  }
}